package org.dfl.plugin.runner;

import org.dfl.plugin.editor.model.DflDiagram;

/**
 * interface to track a dataflow run process
 * @author Piotr Wlodarczyk
 *
 */
public interface RunListener {
	/**
	 * fired when diagram started to run
	 * @param diagram - run diagram
	 */
	public void diagramRun(DflDiagram diagram);
	
	/**
	 * fired when diagram was stopped
	 * @param diagram - stopped diagram
	 */
	public void diagramStopped(DflDiagram diagram);
	
	/**
	 * fired when diagram was paused
	 * @param diagram - paused diagram
	 */
	public void diagramPaused(DflDiagram diagram);
	
	/**
	 * fired when diagram was resumed
	 * @param diagram - resumed diagram
	 */
	public void diagramResumed(DflDiagram diagram);
	
	/**
	 * fired after each run step or adding/removing/enabling/disabling tokens
	 * @param diagram 
	 * @param hasData - true if there is a transition that has data to run
	 */
	public void diagramHasDataToRun(DflDiagram diagram,boolean hasData);
}
